# -*- coding:utf-8 -*-

from django.db import models

# Create your models here.

class Student(models.Model):
    SEX_ITEMS = [
        (1, u'男'),
        (2, u'女'),
        (0, u'未知'),
    ]

    STATUS_ITEMS = [
        (0, u'申请'),
        (1, u'通过'),
        (2, u'拒绝'),
    ]

    name = models.CharField(max_length=128, verbose_name=u"姓名")
    sex = models.IntegerField(choices=SEX_ITEMS, verbose_name=u"性别")
    profession = models.CharField(max_length=128, verbose_name=u"职业")
    email = models.EmailField(verbose_name=u"Email")
    qq = models.CharField(max_length=128, verbose_name=u"QQ")
    phone = models.CharField(max_length=128, verbose_name=u"电话")
    status = models.IntegerField(choices=STATUS_ITEMS, verbose_name=u"审核状态")
    created_time = models.DateTimeField(auto_now_add=True, editable=False, verbose_name=u"创建时间")

    def __unicode__(self):
        return '<Student:{}>'.format(self.name)

    class Meta:
        verbose_name = verbose_name_plural = u"学员信息"
